package xyz.longicorn.driver.config;

import lombok.Data;

/**
 * 自定义的业务异常类
 */
@Data
public class BizException extends RuntimeException {
    private int code;

    private BizException(int code, String message) {
        super(message);
        this.code = code;
    }

    public static BizException create(String message) {
        return new BizException(-1, message);
    }
    public static BizException create(int code,String message) {
        return new BizException(code, message);
    }
}
